package com.deyinet.bdcms.entity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/14 0014.
 */
@Entity
@Table(name = "deviceconfig")
public class Deviceconfig {

    private Integer id;
    private String sn;
    private Float upper;
    private Integer upperResult;
    private Float lower;
    private Integer lowerResult;
    private Integer reportCycle;
    private Integer reportResult;
    private Integer sampleCycle;
    private Integer sampleResult;
    private String netconfig;
    private Integer netconfigresult;
    private Timestamp createdate;
    private Device DeviceBySn;
    
    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "sn", insertable = false, updatable = false)
    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    @Column(name = "upper")
    public Float getUpper() {
        return upper;
    }

    public void setUpper(Float upper) {
        this.upper = upper;
    }

    @Column(name = "lower")
    public Float getLower() {
        return lower;
    }

    public void setLower(Float lower) {
        this.lower = lower;
    }

    @Column(name = "reportcycle")
    public Integer getReportCycle() {
        return reportCycle;
    }

    public void setReportCycle(Integer reportCycle) {
        this.reportCycle = reportCycle;
    }

    @Column(name = "samplecycle")
    public Integer getSampleCycle() {
        return sampleCycle;
    }

    public void setSampleCycle(Integer sampleCycle) {
        this.sampleCycle = sampleCycle;
    }

    @Column(name = "createdate")
    public Timestamp getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Timestamp createdate) {
        this.createdate = createdate;
    }

    @ManyToOne
    @JoinColumn(name = "sn", referencedColumnName = "sn", foreignKey = @ForeignKey(name = "deviceconfig_ibfk_1"))
    public Device getDeviceBySn() {
        return DeviceBySn;
    }

    public void setDeviceBySn(Device deviceBySn) {
        DeviceBySn = deviceBySn;
    }

    public Integer getUpperResult() {
        return upperResult;
    }

    public void setUpperResult(Integer upperResult) {
        this.upperResult = upperResult;
    }

    public Integer getLowerResult() {
        return lowerResult;
    }

    public void setLowerResult(Integer lowerResult) {
        this.lowerResult = lowerResult;
    }

    public Integer getReportResult() {
        return reportResult;
    }

    public void setReportResult(Integer reportResult) {
        this.reportResult = reportResult;
    }

    public Integer getSampleResult() {
        return sampleResult;
    }

    public void setSampleResult(Integer sampleResult) {
        this.sampleResult = sampleResult;
    }

    public String getNetconfig() {
        return netconfig;
    }

    public void setNetconfig(String netconfig) {
        this.netconfig = netconfig;
    }

    public Integer getNetconfigresult() {
        return netconfigresult;
    }

    public void setNetconfigresult(Integer netconfigresult) {
        this.netconfigresult = netconfigresult;
    }
}
